Auto merge of #3628 - zackmdavis:the_maelstrom_of_my_purity_born_of_pain, r=alexcrichton
authorbors <bors@rust-lang.org>
Fri, 3 Feb 2017 00:59:41 +0000 (00:59 +0000)
committerbors <bors@rust-lang.org>
Fri, 3 Feb 2017 00:59:41 +0000 (00:59 +0000)
commit550bd439619c48300059a50ec2559b54fb63edc4
tree625a82ac833646a7c8ab911f5fd4b05b7ebc2822
parent38f52ea846db202f322071f00b083ae8defdda3a
parent88f6a3022e008ec1d6aaaaae298f4bb99dccfb0c
Auto merge of #3628 - zackmdavis:the_maelstrom_of_my_purity_born_of_pain, r=alexcrichton

make build tests not depend on minutiae of rustc output

This little patch arises from the maelstrom of my purity born of pain.

It's the pain of seeing rust-lang/rust#38103 in its perfect crystalline beauty waste away on page four of https://github.com/rust-lang/rust/pulls, waiting, ready, itching to land, dying with anticipation to bring the light of clearer lint group error messages to Rust users of all creeds and nations, only for its promise to be cruelly blocked by the fateful, hateful hand of circular dependency. For it is written in src/tools/cargotest/main.rs that the Cargo tests must pass before the PR can receive Appveyor's blessing, but the Cargo tests could not pass (because they depend on fine details of the output that the PR is meant to change), and the Cargo tests could not be changed (because updating the test expectation to match the proposed new compiler output, would fail with the current compiler).

The Gordian knot is cut in the bowels of cargotest's very notion of comparison (of JSON objects) itself, by means of introducing a magic string literal `"{...}"`, which can server as a wildcard for any JSON sub-object.

And so it will be for the children, and the children's children, and unto the 1.17.0 and 1.18.0 releases, that Cargo's build test expectations will faithfully expect the exact JSON output by Cargo itself, but the string literal `"{...}"` shall be a token upon the JSON output by rustc, and when I see `"{...}"`, I will pass over you, and the failure shall not be upon you.

And this day shall be unto you for a memorial.

supersedes #3513

r? @alexcrichton